<!DOCTYPE html>
<html>
<head>
<title>JavaScript基础学习</title>

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>

<body>

	<script>
		//JavaScript的基础---变量、数据类型
		var i = 10;
		var j = 10;
		var m = i + j;
		document.write(i + j);
		//document.write(m);
	</script>
	<br />
	<script>
		var i = 10;//两者不会影响
		document.write(i);
	</script>
	<br />
	<script>
		var i1 = 100;//1.数字
		var i2 = "100";//2.字符串
		var flag = true;//3.boolean
	</script>
	<br />

	<script>
		var arr1 = [ "Hello", "World", "JavaScript" ];//4.数组的第一种定义方式
		document.write(arr1[2]);
		var arr2 = new Array("Hello", "World", "JavaScript");//数组的第二种定义方式
		document.write(arr2[1]);
		var arr3 = new Array();////数组的第二种定义方式--这样写可以多个,比较方便
		arr3[0] = 10;
		arr3[1] = 20;
		arr3[2] = 30;
		document.write(arr3[1]);
		//5.对象以后再学
	</script>
	<br />
	<script>
		var n = null;//6.null
		document.write(n);
		var x;//7.未定义
	</script>
	<br />
	<script>
		var i1=1000;
		document.write(i1);
		i1=null;//8.可以通过赋值为null的方式清除变量
		document.write(i1);
	</script>
</body>
</html>
